cmake_minimum_required ( VERSION 2.8 )

project ( laper )

# required packages
find_package ( ITK REQUIRED )
#find_package ( PCL REQUIRED )
find_package ( VTK REQUIRED )

## ITK
include ( ${ITK_USE_FILE} )

## pcl
#include_directories ( ${PCL_INCLUDE_DIRS} )
#link_directories ( ${PCL_LIBRARY_DIRS} )
#add_definitions ( ${PCL_DEFINITIONS} )

## VTK
include ( ${VTK_USE_FILE} )

# setters

## the version numbers
set ( PROJECT_VERSION_MAJOR               0 )
set ( PROJECT_VERSION_MINOR               1 )

set ( LOG_LEVEL                           "DEBUG" )
set ( PROJECT_DIR                         ${PROJECT_SOURCE_DIR} )
set ( SOURCE_DIR                          ${CMAKE_CURRENT_SOURCE_DIR} )
set ( INCLUDE_DIR                         ${PROJECT_SOURCE_DIR}/include )

set ( EXECUTABLE_OUTPUT_PATH              ${PROJECT_SOURCE_DIR}/bin )
set ( LIBRARY_OUTPUT_PATH                 ${PROJECT_SOURCE_DIR}/lib )
set ( CMAKE_MODULE_PATH                   ${PROJECT_SOURCE_DIR}/cmake )

if ( NOT EXISTS ${CMAKE_MODULE_PATH}/laper-config.cmake )
     message ( FATAL_ERROR "Cannot find: ${CMAKE_MODULE_PATH}/laper-config.cmake" )
endif ( )

include(${CMAKE_MODULE_PATH}/laper-config.cmake)

# configure a header file to pass some of the CMake settings to the source code
configure_file ( "${INCLUDE_DIR}/laperconfig.h.in" "${PROJECT_BINARY_DIR}/laperconfig.h" )

# definitions
#add_definitions ( -DPCL_NO_PRECOMPILE )

# includes
include_directories (
  ${PROJECT_BINARY_DIR}
  ${SOURCE_DIR}/src/thirdparty/logcpp/
  ${SOURCE_DIR}/src/io/
  ${SOURCE_DIR}
)

# libraries
#add_library ( library_name srcs )

#  subdirectories
add_subdirectory ( data )
add_subdirectory ( doc )
add_subdirectory ( include )
add_subdirectory ( spike )
add_subdirectory ( src )
add_subdirectory ( test )

# executables
#add_executable ( executable_name srcs )

# link libraries
#target_link_libraries ( executable_name libs ${VTK_LIBRARIES} ${ITK_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${Boost_LIBRARIES} ${OpenCV_LIBS} )
